package com.wbk.lotterysystemsystemservice.controller;


import com.wbk.lotterysystemsystemservice.controller.biz.EmailBiz;
import com.wbk.system.qo.LotteryAuditResultQO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.web.bind.annotation.*;
import com.wbk.system.qo.StoreAuditResultQO;
import result.Result;


//@CrossOrigin
@Api
@RestController
@RequestMapping("/system/api/email")
public class EmailController {

    @Autowired
    EmailBiz emailBiz;

    @ApiOperation(value = "发送验证码接口", notes = "发送验证码")
    @GetMapping("/sendCode")
    public Result<String> sendCode(@ApiParam(value = "邮箱", required = true) @RequestParam(value = "email") String email) {
        return emailBiz.sendCode(email);
    }

    @ApiOperation(value = "商家认证审核结果通知接口", notes = "商家认证审核结果通知")
    @PostMapping("/storeAuditResult")
    public Result<String> storeAuditResult(@RequestBody StoreAuditResultQO storeAuditResultQO) {
        return emailBiz.storeAuditResult(storeAuditResultQO);
    }

    @ApiOperation(value = "抽奖活动审核结果通知接口", notes = "抽奖活动审核结果通知")
    @PostMapping("/lotteryAuditResult")
    public Result<String> lotteryAuditResult(@RequestBody LotteryAuditResultQO lotteryAuditResultQO) {
        return emailBiz.lotteryAuditResult(lotteryAuditResultQO);
    }
}
